package com.srit.recipes.entity;

import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Table;
import java.util.Date;

@Table
@Entity
@Getter
@Setter
@EntityListeners(AuditingEntityListener.class)
public class InventoryInfo extends RecipesId {

    private String name;

    private Long wight;

    private String unit;

    @CreatedDate
    @Column(nullable = false,columnDefinition = " datetime comment '创建时间'",updatable = false)
    protected Date createTime;


    @LastModifiedDate
    @Column(columnDefinition = " datetime comment '更新时间'")
    protected Date updateTime;


    @Column
    private Date expiration;

    /**
     * 批次号
     */
    private String batch;

    private String distributor;

    private Double price;




}
